import mediaServer.InitiateMS;
import applet.InitiateC;
import applicationServer.InitiateAS;


public class Initiate {

	public static void main (String[] args){
		if(args.length != 0){
			if (args[0].equals("0"))
				new InitiateAS();
			else if (args[0].equals("1"))
				new InitiateMS();
			else if (args[0].equals("2")){
				new InitiateC("C1");
			}else if (args[0].equals("3")){
				new InitiateC("C2");
			}
		}else{
			new InitiateAS();
			new InitiateMS();
			wait(2000);
			new InitiateC("C1");
			//wait(2000);
			//new InitiateC("C2");
		}
	}
	
public static void wait (int n){
        long t0, t1;
        t0 =  System.currentTimeMillis();
        do{
            t1 = System.currentTimeMillis();
        }
        while ((t1 - t0) < n );
    }
	
}
